#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
 
  int count = (a == 6) + (b == 6) + (c == 6); // 计算6的数量

  if (count == 0) {
    cout << 0 << endl;
  } else if (count == 1) {
    cout << 10 << endl;
  } else if (count == 2) {
    cout << 100 << endl;
  } else {
    cout << 1000 << endl;
  }

  return 0;
}